﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication1.TestJs
{
    /// <summary>
    /// AjaxHandler 的摘要说明
    /// </summary>
    public class AjaxHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {

            string data= @"<?xml version='1.0' encoding='utf-8' ?>
                            <Info>
                              <User id='1'>
                                <name>陶国荣</name>
                                <sex>男</sex>
                                <email>tao_guo_rong@163.com</email>
                              </User>
                              <User id='2'>
                                <name>李建洲</name>
                                <sex>女</sex>
                                <email>xiaoli@163.com</email>
                              </User>
                            <User id='3'>
                                <name>李世姐</name>
                                <sex>女</sex>
                                <email>lsj6007@163.com</email>
                              </User>
                            </Info>
                            ";
            context.Response.ContentType = "text/xml";
            context.Response.Write(data);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}